package tankbb;

import java.awt.Color;
import java.awt.Graphics;

public class Explode {

	private static int[] EXPLODE_DIAMETER = {100};
	
	boolean live = true;
	int x, y;
	TankClient tc;
	int cnt;
	
	public boolean isLive(){
		return this.live;
	}
	
	public Explode(int x, int y, TankClient tc) {
		this.x = x;
		this.y = y;
		this.tc = tc;
	}

	public void setDead(){
		this.live = false;
	}
	
	public void draw(Graphics g){
		
		if(cnt == EXPLODE_DIAMETER.length){
			this.setDead();
			return;
		}
		
		Color c = g.getColor();
		g.setColor(Color.YELLOW);
		
		g.fillOval(x, y, EXPLODE_DIAMETER[cnt], EXPLODE_DIAMETER[cnt]);
		cnt++;
		g.setColor(c);
	}
}